package com.frontop.system.modules.sys.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author YangJia
 * @since 2022-01-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysOrganization对象", description="")
public class SysOrganization implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "组织名称")
    private String name;

    @ApiModelProperty(value = "上级组织")
    private Integer pId;

    @ApiModelProperty(value = "组织层级")
    private Integer level;

    @ApiModelProperty(value = "组织邮箱")
    private String email;

    @ApiModelProperty(value = "组织电话")
    private String tel;

    @ApiModelProperty(value = "组织地址")
    private String address;

    @ApiModelProperty(value = "组织状态")
    private Integer status;

    @ApiModelProperty(value = "标签")
    private String label;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;


    @ApiModelProperty(value = "下级所有组织")
    @TableField(exist = false)
    private List<SysOrganization> children;

    @ApiModelProperty(value = "拥有菜单")
    @TableField(exist = false)
    private List<Integer> menuList;
}
